#!/bin/sh -e

clsed '37a #include <sys/types.h>' nhlt/nhlt-dmic-info.c

./configure \
    --prefix=/usr \
    --disable-alsaconf \
    --disable-bat \
    --disable-xmlto \
    --disable-nls

make
make DESTDIR="$1" install

# Get rid of sbin
mv "$1/usr/sbin/alsactl" "$1/usr/sbin/alsa-info.sh" "$1/usr/bin"
rm -rf "$1/usr/sbin"
